Hello and welcome to this lecture in this little shop will be creating a few variables that we will
use later to create a paddle that we can use to hit the ball later on in the game.
We need the paddle to have a height and also a with will also need to know where the paddle will point
from.
For example want the starting point on the x axis or x coordinate that we're will use later on in the
game to perform some calculations that we can use to determine the movement of the ball and the paddle.
Okay.
Let's start defining the variables for the paddle.
So these is the jabb Us group so far we are going to define the variables where the other variables
are where we find them.
So we're just going to get a tap down and type in the world var for variable.
I'm going to call the variable paddle height.
Okay.
An hour give it a value of
12.
Let's create another variable called paddle with.
Now give this a wave off 72.
Next we want to define a variable that will specify where the starting point or the puddle be from the
x axis or x coordinate.
So we do that by defining a variable for that I'll call it variable How do you do it.
Bandeau X which will be obar case X..
So don't confuse the variable.
This is an upper case x.
Notice that what like is variables or already set up so this variable that will terminate a starting
point for the paddle on the x axis.
I've called it pad all x and the values have given it.
This will be the canvass week minus the power door with divided by 2 right.
So with the value that will be well then close then parenthesis
come big come laughs.
Dealt with.
Remind us.
Paddle with them.
We've got a variable quad paddle we thought to be the come bass.
Yeah.
Dont we.
So this is the matter with my in-laws with minus the paddle with.
And then we go in to divide that value in half.
So going to divide by two.
So this paddle X back is x variable will be was to become of us dot the width of the comebacks minus
the paddle with divided by two.
Okay.
So we've got our variable dis defined.
Let me run through them again.
The first was a variable to determine the height of the paddle and have called it pad or height and
giving a value of 12.
The next is the variable paddle with which will determine the width of the paddle how long the paddle
will be given it's 72 pixels is aim pixels.
When we finally have defined another variable or paddle x axis x that will determine where the paddle
will start from on the x axis or wad in it and I've given the value of canvas that is in full canvas
with the with the compass.
My in-laws the paddle with divided by two so that would be the starting point.
The width of the come vase minus the width of the panel provided by to thank you so much for watching
the next leg.
Sure we will create a function that will draw the paddle by half an hour.